import fetch from 'common/src/utils/fetch';
const api_name = 'api/welcomeservice';
const group_name = 'examinationStudents';

export default{
  'pageUrl': `${api_name}/${group_name}/list`,
  'exportUrl':`${api_name}/${group_name}/export?path=`,
  save(data){
    return fetch({
      url:`${api_name}/${group_name}`,
      method:'post',
      data:data
    })
  },

  findById(id){
    return fetch({
      url:`${api_name}/${group_name}/${id}`,
      method:'get'
    })
  },

  updateById(data){
    return fetch({
      url:`${api_name}/${group_name}`,
      method:'put',
      data:data
    })
  },
  deleteById(id){
    var data = {ids : id}
    return fetch({
      url:`${api_name}/${group_name}`,
      method:'delete',
      data:data
    })
  },
  findByStudentId(data){
    return fetch({
      url:'/api/studentservice/studentInfo/findStuInfoListByUserId?studentId='+data,
      method:'get'
    })
  },
  getExam(){
    return fetch({
      url:`${api_name}/${group_name}/exam`,
      method:'get'
    })
  },
  exportResult(data){
    return fetch({
      url:`${api_name}/${group_name}/excel/examResult`,
      method:'post',
      data:data,
      showMask: false
    })
  },
  getReportStatus(key){
    return fetch({
      url:`${api_name}/${group_name}/result/${key}`,
      method:'get',
      showMask:false
    })
  },
  getResultTempalte(){
    return `${api_name}/${group_name}/template/examResult`
  },
  exportList(data){
    return fetch({
      url:`${api_name}/${group_name}/excel/examList`,
      method:'post',
      data:data
    })
  },
  getListTempalte(){
    return `${api_name}/${group_name}/template/examList`
  },
  getimportStatus(key){
    return fetch({
      url:`${api_name}/${group_name}/import/${key}`,
      method:'get'
    })
  },
  getColleges(){
    return fetch({
      url:`${api_name}/${group_name}/colleges`,
      method:'get'
    })
  },
}

